import { ConfigProvider } from "antd";
import zhCN from "antd/locale/zh_CN";
import { Outlet, useLocation } from "umi";

export default function Layout() {
  const { pathname } = useLocation();
  if (pathname === "/login") return <Outlet />;

  return (
    <ConfigProvider
      locale={zhCN}
      theme={{
        token: {
          colorPrimary: "#4A90E2",
        },
      }}
    >
      <div className="flex overflow-hidden relative min-h-screen">
        {/* <div className="w-32 bg-white p-4">
          <img src={Logo} className=" h-auto  w-full max-w-full" alt="" />
        </div> */}
        <Outlet />
      </div>
    </ConfigProvider>
  );
}
